package gcontent.Results;

import gcontent.action.SearchType;

public class Result {
	private String path = "";
	private String host = "";
	private boolean visible = false;
	
	public Result(String path, String host, boolean visible) {
		super();
		this.path = path;
		this.host = host;
		this.visible = visible;
	}	
	
	public Result(String path, String host, int result_type) {
		super();
		this.path = path;
		this.host = host;
		
		if (result_type == SearchType.TYPE_ELINKS || result_type == SearchType.TYPE_TORRENTS)
			if (this.path != null)
				if (this.path.indexOf(host) >= 0)
					this.path = this.path.split(host)[1].substring(1);
			
		this.visible = false;
	}	
	
	public String getPath() {
		return path;
	}
	
	public void setPath(String path) {
		this.path = path;
	}
	
	public String getHost() {
		return host;
	}
	
	public void setHost(String host) {
		this.host = host;
	}
	
	public boolean isVisible() {
		return visible;
	}

	public void setVisible(boolean visible) {
		this.visible = visible;
	}
}
